]> git.r.bdr.sh - rbdr/super-polarity/blobdiff - Super Polarity/SuperPolarity.cs
Chubas's House happened.
[rbdr/super-polarity] / Super Polarity / SuperPolarity.cs
index 40f147779419046afa82f9efe9ee23f226826168..c43582eda87f868913b405e0824ad6f8db0e3eb7 100644 (file)
@@ -17,15 +17,20 @@ namespace SuperPolarity
     /// </summary>
     public class SuperPolarity : Game
     {
-        GraphicsDeviceManager graphics;
+        public static GraphicsDeviceManager graphics;
         SpriteBatch spriteBatch;
 
+        // Input Handler
+        KeyboardState currentKeyboardState;
+        GamePadState currentGamePadState;
+
         MainShip player;
 
         public SuperPolarity()
             : base()
         {
-            graphics = new GraphicsDeviceManager(this);
+            SuperPolarity.graphics = new GraphicsDeviceManager(this);
+            SuperPolarity.graphics.PreferMultiSampling = true;
             Content.RootDirectory = "Content";
         }
 
@@ -53,7 +58,7 @@ namespace SuperPolarity
 
             Vector2 playerPosition = new Vector2(GraphicsDevice.Viewport.TitleSafeArea.X, GraphicsDevice.Viewport.TitleSafeArea.Y + GraphicsDevice.Viewport.TitleSafeArea.Height / 2);
 
-            player.Initialize(Content.Load<Texture2D>("Graphics\\player"), playerPosition);
+            player.Initialize(Content, Content.Load<Texture2D>("Graphics\\main-ship"), playerPosition);
         }
 
         /// <summary>
@@ -77,6 +82,9 @@ namespace SuperPolarity
 
             // TODO: Add your update logic here
 
+            InputController.UpdateInput();
+            player.Update(gameTime);
+
             base.Update(gameTime);
         }
 
@@ -86,7 +94,7 @@ namespace SuperPolarity
         /// <param name="gameTime">Provides a snapshot of timing values.</param>
         protected override void Draw(GameTime gameTime)
         {
-            GraphicsDevice.Clear(Color.CornflowerBlue);
+            GraphicsDevice.Clear(Color.White);
 
             spriteBatch.Begin();